<!-- 我的证件 -->
<template>
	<view class="body">
		<nodata class="nodata" v-if="isData"></nodata>
		<view v-for="(item,index) in listData">
			<view class="content">
				<view class="title">
					<view class="title_line"></view>
					<text class="item_title">{{item.qualificaCategory}}</text>
				</view>
				<view class="line"></view>
				<view class="itme_text">
					<view class="text_left">证件号码</view>
					<view class="text_right">{{item.qualificaCategoryNo}}</view>
				</view>
				<view class="line"></view>
				<view class="itme_text">
					<view class="text_left">有效期至</view>
					<view class="text_right">{{item.qualifiCertificateTo}}</view>
				</view>
				<view class="line"></view>
				<view class="itme_text">
					<view class="text_left">发证机关</view>
					<view class="text_right">{{item.certificationOffice}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import store from "@/store/index.js";
	import nodata from '@/components/nodata.vue';
	export default {
		data() {
			return {
				listData: [],
			 isData: false
			};
		},
		components: {
			nodata
		},
		methods: {
			getMyZj() {
				this.$api.myZj({
					'idCard': store.getters.getEmpIdCard
				}).then(res => {
					console.log(res)
					if (res.data['code'] == 200) {
						this.listData = res.data['data']
						if (this.listData.length == 0) {
							console.log('111111111')
							this.isData = true
						}
					}
				}).catch(res => {

				});
			}
		},
		mounted() {
			this.getMyZj()
		}
	}
</script>

<style lang="scss">
	.body {
		padding: 20rpx;
		
		.nodata {
			padding-top: 300rpx;
			margin: 0rpx auto;
		}

		.content {
			background-color: #FFFFFF;
			border-radius: 20rpx;
			padding-top: 10rpx;
			padding-bottom: 10rpx;
			margin-bottom: 20rpx;


			.title {
				padding-top: 25rpx;
				padding-bottom: 25rpx;
				display: flex;
				align-items: center;

				.title_line {
					width: 5rpx;
					height: 50rpx;
					background-color: $app-color;
				}

				.item_title {
					margin-left: 30rpx;
					font-size: 35rpx;
				}

			}

			.line {
				height: 1rpx;
				background-color: #F2F2F2;
				margin-left: 20rpx;
				margin-right: 20rpx;
			}

			.itme_text {
				display: flex;
				align-items: center;
				margin-left: 20rpx;
				padding-top: 25rpx;
				padding-bottom: 25rpx;

				.text_left {
					font-size: 32rpx;
					color: #666666;
				}

				.text_right {
					margin-left: 32rpx;
					font-size: 30rpx;
				}
			}
		}
	}
</style>
